package com.aaa.day1104.demo03;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;

/**
 * @author ${崔灿}
 * @date 2022/11/04 17:30
 **/

public class Test01 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        Collections.addAll(list,"张无忌", "周芷若", "赵敏", "张强", "张三丰");
        Consumer<String> consumer =item-> System.out.println(item);
        list.stream().filter(item->item.startsWith("张")).filter(item -> item.length()==3).forEach(item-> System.out.println(item));
    }
}
